<?php
include_once 'app/until/GFW_database.php';

class Db_user_page_widget extends Model_Db_Core {

	protected  $con = null;

	function __construct(){
		//
	}
	public function GetUserWidgetByUseridAndSpalte($user_id,$spalte){
	    $counter = 0;
		$filter  = array('user_id'=> $user_id,'spalte'=> $spalte);
	    $select  = array();
	    
	    parent::getSQLResult(__CLASS__,$filter,$select,0,99);
	    $widget = parent::result();
		$modul = new Db_Modul();
		foreach ($widget as $wid){
			if($wid->modul > 0){
				$modul = $modul->GetModulWidget($wid->modul);
				$widget[$counter]->modul = $modul;				
			}
			$counter++;
		}		
		return $widget;
	}
	
}

?>